<?php

namespace Admin\Model;

use Think\Model;

class BackMenuModel extends BaseModel {

    //定义主表
    protected $tableName = 'backmenu';
    protected $_validate = array(
        array('name', 'require', '验证码必须！'), //默认情况下用正则进行验证
    );

    public function getMenuName($id) {
        $title = $this->where("id={$id}")->field('name')->find();
        return $title;
    }

}
